SAS

Section: User Commands (1)
Updated: 29 May 1988
Index Return to Main Contents
 

NAME

sas - SPUR assembler  

SYNOPSIS

sas [ -a ] [ -L ] [ -p ] [-Ipathname ] [ -o objfile ] [ -Dname[=def ] [ -Uname ] file  

DESCRIPTION

Sas translates assembly code in the named file into executable object code in the specified objfile.

All undefined symbols in the assembly are treated as global.

The output of the assembly is left in the file objfile. If the -o flag is omitted, file a.out is used.  

OPTIONS

-a
Assemble only. Normally, sas invokes the linker (sld) to perform various normalizing tasks (backpatching forward references, etc.). This switch suppresses that pass, leaving the "raw" assembly output in the output file. This option is seldom useful except for debugging the assembler and linker.
-p
Invoke the preprocessor. This runs the preprocessor, cpp, over the input file. It is necessary to do so in the presence of preprocessor (#) directives.
-f
Allow ``fake'' operation codes that have significance to the simulator. By default, these are not allowed. Additionally, when the -f switch is on, certain operations are given distinguished opcodes so that the simulator can distinguish them. Without the -f switch they are synonyms for other instructions. This option may be expected to vanish in the future.
-F
Use the floating-point format of the machine running sas. This is useful only if you are going to run a simulator on the host upon the result of the assembly. This option may be expected to vanish in the future.
-Ipathname
Include file directory. Add pathname to the list of directories in which to search for #include files with relative pathnames (not beginning with slash). The preprocessor first searches for #include files in the directory containing sourcefile, then in directories named with -I options (if any), and finally, in /usr/include . The -I switch implies the -p switch.
-L
Leave local labels starting with `L', the assembler usually directs the linker to remove these.
-Dname[=def
Define name for the preprocessor, giving it value def, if the latter is supplied, and otherwise the null string. This switch implies -p.
-Uname
Undefine any initial definition of symbol name for cpp(1).
 

ASSEMBLER FORMAT

SPUR assembly language conventions resemble those of `as' for the VAX in the Berkeley release. Immediate constants begin with `$'. Integer (floating-point, special) register operands have the form rn (fn, sn), or may be manifest integer expressions.

Numeric local labels are allowed, (re)defined by an integer followed by a colon, and referenced as an integer followed by `f' (next label defined with this number) or `b' (last label defined with this number).

The pseudo-operations `.text1,' `.text2,' `.text3,' `.data1,' `.data2,' and `.data3' provide alternate text and data assembly regions, which the assembler concatenates after the default text and data regions.

The pseudo-operations `.sdata,' `.sdata1,' `.sdata2,' `.scomm,' and `.slcomm' are analogous to the operations without the initial `s', but place or allocate from the shared segment of memory.

The assembler is much more liberal about load-time expressions. The values of these expressions may involve any operands, symbolic or literal, whether or not defined in the current assembly. The defining expressions for `.set' symbols are equally liberal, and all such symbols may be exported. The only restriction is that there may not be circular dependences in the definition of any symbol. Also, certain expressions, such as those associated with `.org' or `.space' or those designating registers, must still be manifest.  

SEE ALSO

sld(1), a.out(5)


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ASSEMBLER FORMAT
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 22:49:42 GMT, December 11, 2024